<extend name="Layout:base"/>

<block name="title">{$res.title}</block>

<block name="css"></block>

<block name="main">
    <div class="container">
        <div class="section" id="mysec">
            <div class="row">
                <div class="col s12 m12 l12">
                    <div class="card-panel">
                        <div class="row">
                            <h4 class="center-align">{$res.title}</h4>
                            <div class="left" style="color: gray">发布时间：<span
                                    class="mui--divider-right">{:date("Y-m-d",$res["addtime"])}&nbsp;</span>&nbsp;报名人数：<span>{:sumPeo($res['enid'],$res['enclass'])}/{$res.num}</span>
                            </div>
                            <div class="right">报名截止时间：<span
                                    class="center-aligne" style="color: red">{:date("Y-m-d",$res["start"])}~{:date("Y-m-d",$res["end"])}</span>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="valign" id="content-text">
                            {$res.content}
                        </div>
                        <div class="center">
                            <if condition="Is_Enrolled($_SESSION['stuid'],$res['enclass']) gt 0 ">
                                <a class="waves-effect waves-light btn disabled red">已报名</a>
                                <else/>
                                <if condition="sumPeo($res['enid'],$res['enclass']) lt $res['num'] ">
                                    <if condition="time() lt ($res['end']+86400) ">
                                        <eq name="vo.enclass" value="1">
                                            <!-- <a class="waves-effect waves-light btn red"
                                               href="{:U('Stuform/oneAdd',array('enid'=>$res['enid']))}"
                                               onclick="if(confirm('确定报名吗?')==false)return false;">报名</a> -->
                                               <a class="waves-effect waves-light btn red"
                                               href="#">报名</a>
                                            <else/>
                                            <!-- <a class="waves-effect waves-light btn red"
                                               href="{:U('Stuform/team',array('enid'=>$res['enid']))}">报名</a> -->
                                               <a class="waves-effect waves-light btn disabled red"
                                               href="#">报名</a>
                                        </eq>
                                        <else/>
                                        <a class="waves-effect waves-light btn disabled red">报名已过期</a>
                                    </if>
                                    <else/>
                                    <a class="waves-effect waves-light btn disabled red">报名已满</a>
                                </if>
                            </if>
                        </div>
                        <br>
                        <div class="row">
                            <div class="right">
                                <a href="javascript:history.back(-1)">返回上一页</a>
                            </div>
                        </div>

                        <div class="row">
                        </div>
                        <div class="clearfix"></div>


                    </div>
                </div>
            </div>
        </div>
    </div>


</block>

<block name="js">
    <script>
        $(function () {
            $("#content-text img").removeAttr("style");
        });
    </script>
    <script>window._bd_share_config = {
        "common": {
            "bdSnsKey": {},
            "bdText": "",
            "bdMini": "2",
            "bdMiniList": false,
            "bdPic": "",
            "bdStyle": "0",
            "bdSize": "16"
        },
        "slide": {"type": "slide", "bdImg": "2", "bdPos": "right", "bdTop": "100"},
        "image": {"viewList": ["qzone", "tsina", "tqq", "renren", "weixin"], "viewText": "分享到：", "viewSize": "24"},
        "selectShare": {"bdContainerClass": null, "bdSelectMiniList": ["qzone", "tsina", "tqq", "renren", "weixin"]}
    };
    with (document)0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];</script>


</block>